<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JQuery对象</title>
  <script src="../../../../../lib/JQuery3.7.1.js"></script>
</head>
<body>
    <div>div1</div>
    <div>div2</div>
    <div>div3</div>
    <div>div4</div>
  <script>
    //将JQuery对象转换为DOM对象
    var div1=$('div')[0];
    console.log("$()[n] : "+div1);
    var div2=$('div2').get(1);
    console.log("$('').get(n) : "+div2);
    //将DOM对象转换为JQuery对象
    var div3=document.querySelectorAll('div')[2];
    divQ=$(div3);
    console.log(divQ);
  </script>
</body>
</html>